home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
dev
/
c
/
vbcc.lha
/
vbcc
/
targets
/
ppc-warpos
/
include
/
stdarg.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-04-28
|
933b
|
35 lines
#pragma begin_header
/*
** stdarg.h for vbcc-PowerOpen/WarpOS
** V1.1 26-Feb-01 vb
** completely rewritten + va_copy added
** V1.0 21-Apr-98 phx
** vbcc PPC CG V0.2n provides a completely different vararg-solution:
** The slots for fixed args remain reserved in the stack frame.
** The address of lastarg+1 is guaranteed to point to the first vararg.
** V0.1 19-Apr-98 phx
** created
*/
#ifndef __STDARG_H
#define __STDARG_H 1
typedef unsigned char *va_list;
#define __va_align(type) (4)
#define __va_do_align(vl,type) ((vl)=(char *)((((unsigned int)(vl))+__va_align(type)-1)/__va_align(type)*__va_align(type)))
#define __va_mem(vl,type) (__va_do_align((vl),type),(vl)+=sizeof(type),((type*)(vl))[-1])
#define va_start(ap, lastarg) ((ap)=(va_list)(&lastarg+1))
#define va_arg(vl,type) __va_mem(vl,type)
#define va_end(vl) ((vl)=0)
#define va_copy(new,old) ((new)=(old))
#endif
#pragma end_header